/*****************************************************************************/
/* Domino Operation System GUI Specific Module                               */
/*                                                                           */
/* Copyright (C) 2014 Laszlo Arvai                                           */
/* All rights reserved.                                                      */
/*                                                                           */
/* This software may be modified and distributed under the terms             */
/* of the BSD license.  See the LICENSE file for details.                    */
/*****************************************************************************/

#ifndef __guiBWGraphics_h
#define __guiBWGraphics_h

///////////////////////////////////////////////////////////////////////////////
// Includes
#include <dosKernel.h>
#include <guiTypes.h>

///////////////////////////////////////////////////////////////////////////////
// Const
#define guiCUSTOM_BRUSH_SIZE 8

///////////////////////////////////////////////////////////////////////////////
// Function prototypes

void guiInitBWGraphics(void);

void guiClearScreen(void);

// canvas functions
void guiOpenCanvas( dosInt16 in_left, dosInt16 in_top, dosInt16 in_right, dosInt16 in_bottom );
void guiCloseCanvas( dosBool in_refresh );
void guiRefreshCanvas( void );

void guiSetPen( dosByte in_index );
void guiSetDrawMode( dosByte in_draw_mode );

void guiDrawPixel( dosInt16 in_x, dosInt16 in_y );

// Line functions
void guiDrawLine( dosInt16 in_startx, dosInt16 in_starty, dosInt16 in_endx, dosInt16 in_endy );
void guiDrawHorizontalLine( dosInt16 in_startx, dosInt16 in_endx, dosInt16 in_y );
void guiDrawVerticalLine( dosInt16 in_x, dosInt16 in_starty, dosInt16 in_endy );

// Rectangle functions
void guiDrawRectangle( dosInt16 in_left, dosInt16 in_top, dosInt16 in_right, dosInt16 in_bottom );
void guiFillRectangle( dosInt16 in_left, dosInt16 in_top, dosInt16 in_right, dosInt16 in_bottom );

// Bitmap functions
void guiDrawBitmap( dosInt16 in_dest_x, dosInt16 in_dest_y, dosHandle in_bitmap_handle );
guiSize guiGetBitmapSize( dosHandle in_bitmap_handle );

void guiSetSystemBrush( dosByte in_index );

// Text functions
void guiSetTextAlign( dosByte in_align );
void guiSetFont( dosHandle in_font_handle );
guiSize guiGetTextExtent( dosString in_string );
void guiDrawText( dosInt16 in_x, dosInt16 in_y, dosString in_string );

guiSize guiGetResourceTextExtent( dosHandle in_string_handle );
void guiDrawResourceText( dosInt16 in_x, dosInt16 in_y, dosHandle in_string_handle );

// Rect Functions
void guiExtendRect( guiRect* in_rect_to_extend, const guiRect* in_rect_to_include );

#endif
